package com.shujia.day07;

class A {
    public void show() {
        show2();
    }
    public void show2() {
        System.out.println("我");
    }
}
class B extends A {
    /*
        public void show() {
            show2();
        }
     */
    public void show2() {
        System.out.println("爱");
    }
}
class C extends B {
    public void show() {
        super.show(); // show2();
    }
    public void show2() {
        System.out.println("你");
    }
}

public class Test2 {
    public static void main(String[] args) {
        A a = new B();
        a.show(); // 爱
        B b = new C();
        b.show(); // 你
    }
}

